﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OpenCommunityProfileDetailsAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenCommunity.OpenCommunityProfileDetailsAdmin" %>
<owc:OwGrid ID="OpenCommunityProfileDetailsGrid" runat="server" SkinID="OwGridAdmin"
    DataSourceID="OwOpenCommunityProfileDetailsOds" AutoGenerateColumns="False" CellSpacing="0"
    GridLines="None" OwEnableMessageDisplay="True" OwMessageDisplayType="InPlace">
    <MasterTableView DataSourceID="OwOpenCommunityProfileDetailsOds" DataKeyNames="OpenCommunityProfileDetailID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("OpenCommunityProfileDetailID")%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="LanguageCode" />
                            </td>
                            <td>
                                <%# Eval("LanguageCode") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Name" />
                            </td>
                            <td>
                                <%# Eval("Name")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="ShortName" />
                            </td>
                            <td>
                                <%# Eval("ShortName")%>  //<%# Eval("Description")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:InfoLabel %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR OwText="EnableBegin" runat="server" />
                            </td>
                            <td>
                                <%#Eval("EnableBegin")%>
                            </td>
                            <td>
                                <owc:OwR OwText="EnableEnd" runat="server" />
                            </td>
                            <td>
                                <%#Eval("EnableEnd")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR OwText="HomeDisplayBegin" runat="server" />
                            </td>
                            <td>
                                <%#Eval("HomeDisplayBegin")%>
                            </td>
                            <td>
                                <owc:OwR OwText="HomeDisplayEnd" runat="server" />
                            </td>
                            <td>
                                <%#Eval("HomeDisplayEnd")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR OwText="HotDisplayBegin" runat="server" />
                            </td>
                            <td>
                                <%#Eval("HotDisplayBegin")%>
                            </td>
                            <td>
                                <owc:OwR OwText="HotDisplayEnd" runat="server" />
                            </td>
                            <td>
                                <%#Eval("HotDisplayEnd")%>
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR OwText="CreatingUser" runat="server" />
                            </td>
                            <td>
                                <%#Eval("CreatingUser") != null ? (Membership.GetUser(Eval("CreatingUser")) != null ? Membership.GetUser(Eval("CreatingUser")).UserName : "n/a") : "" + " /"%>
                            </td>
                            <td>
                                <owc:OwR OwText="DateTimeCreated" runat="server" />
                            </td>
                            <td>
                                <%#Eval("DateTimeCreated")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR OwText="EditingUser" runat="server" />
                            </td>
                            <td>
                                <%#Eval("EditingUser") != null ? (Membership.GetUser(Eval("EditingUser")) != null ? Membership.GetUser(Eval("EditingUser")).UserName : "n/a") : "" + " /"%>
                            </td>
                            <td>
                                <owc:OwR OwText="DateTimeEdited" runat="server" />
                            </td>
                            <td>
                                <%#Eval("DateTimeEdited")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR OwText="DeletingUser" runat="server" />
                            </td>
                            <td>
                                <%#Eval("DeletingUser") != null ? (Membership.GetUser(Eval("DeletingUser")) != null ? Membership.GetUser(Eval("DeletingUser")).UserName : "n/a") : "" + " /"%>
                            </td>
                            <td>
                                <owc:OwR OwText="DateTimeDeleted" runat="server" />
                            </td>
                            <td>
                                <%#Eval("DateTimeDeleted")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Address %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR  runat="server" OwText="Continent" />
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("ContinentID")).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR  runat="server" OwText="CountryLabel" />
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("CountryID")).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR  runat="server" OwText="Province" />
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("ProvinceID")).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR  runat="server" OwText="District" />
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("DistrictID")).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR  runat="server" OwText="Ward" />
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("WardID")).Name%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ OwR:CommandLabel %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR  OwText="IsHot" runat="server" />
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsHotCb" runat="server" Checked='<%#Eval("IsHot")%>' AutoPostBack="true"
                                    OnCheckedChanged="IsHot_CheckedChanged" Text='<%#Eval("OpenCommunityProfileDetailID")%>'
                                    CssClass="HiddenText" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR  OwText="IsApproved" runat="server" />
                            </td>
                            <td>
                                <owc:OwCheckBox runat="server" Checked='<%#Eval("IsApproved")%>' AutoPostBack="true"
                                    ID="IsApprovedCb" Text='<%#Eval("OpenCommunityProfileDetailID")%>' CssClass="HiddenText"
                                    OnCheckedChanged="IsApprovedCb_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR  OwText="IsHomeDisplay" runat="server" />
                            </td>
                            <td>
                                <owc:OwCheckBox runat="server" Checked='<%#Eval("IsHomeDisplay")%>' AutoPostBack="true"
                                    ID="IsHomeDisplayCb" Text='<%#Eval("OpenCommunityProfileDetailID")%>' CssClass="HiddenText"
                                    OnCheckedChanged="IsHomeDisplayCb_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR  OwText="IsDeleted" runat="server" />
                            </td>
                            <td>
                                <owc:OwCheckBox runat="server" Checked='<%#Eval("IsDeleted")%>' AutoPostBack="true"
                                    ID="IsDeletedCb" Text='<%#Eval("OpenCommunityProfileDetailID")%>' CssClass="HiddenText"
                                    OnCheckedChanged="IsDeleted_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR  OwText="IsEnabled" runat="server" />
                            </td>
                            <td>
                                <owc:OwCheckBox runat="server" Checked='<%#Eval("IsEnabled")%>' AutoPostBack="true"
                                    ID="IsEnabledCb" Text='<%#Eval("OpenCommunityProfileDetailID")%>' CssClass="HiddenText"
                                    OnCheckedChanged="IsEnabledCb_CheckedChanged" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn" HeaderText="<%$ OwR:Modify %>">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/OpenCommunityProfileDetailsEdit.aspx?ID=<%#Eval("OpenCommunityProfileDetailID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" /></a>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn" HeaderText="<%$ OwR:Delete %>">
                <ItemTemplate>
                    <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                        ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                        ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <%
                    Response.Redirect("OpenCommunityProfileDetailsEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</owc:OwGrid>
<owc:OwObjectDataSource ID="OwOpenCommunityProfileDetailsOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenCommunityProfileDetailsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenCommunityProfileDetailsBLL"
    EnablePaging="True" SelectCountMethod="OwGetByDynamicCount" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="isHomeDisplay" Type="Boolean" />
        <asp:Parameter Name="isHot" Type="Boolean" />
        <asp:Parameter Name="enableBegin" Type="DateTime" />
        <asp:Parameter Name="enableEnd" Type="DateTime" />
        <asp:Parameter Name="homeDisplayBegin" Type="DateTime" />
        <asp:Parameter Name="homeDisplayEnd" Type="DateTime" />
        <asp:Parameter Name="hotDisplayBegin" Type="DateTime" />
        <asp:Parameter Name="hotDisplayEnd" Type="DateTime" />
        <asp:Parameter Name="isApproved" Type="Boolean" />
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter Name="creatingUser" DbType="Guid" />
        <asp:Parameter Name="editingUser" DbType="Guid" />
        <asp:Parameter DbType="Guid" Name="deletingUser" />
        <asp:Parameter Name="continentID" Type="Int64" />
        <asp:Parameter Name="countryID" Type="Int64" />
        <asp:Parameter Name="provinceID" Type="Int64" />
        <asp:Parameter Name="districtID" Type="Int64" />
        <asp:Parameter Name="wardID" Type="Int64" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="isEnabled" Type="Boolean" />
        <asp:Parameter Name="openCommunityProfileID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
